('nicedog' artwork by Tom Attix)
Comix2 Applet
-- written by Eric C. Harshbarger while at the New Media Marketing lab at Sun Microsystems, Inc. .
[CAFÉ]-[CREATORS]-[APPLETS]-[DOWNLOADING]-[RULES]-[RESOURCES]
There is a beautiful execution of this applet at Joel Natividad's page -- Good job
[CAFÉ]-[CREATORS]-[APPLETS]-[FAQ]-[RESOURCES]-[RULES]-[DOWNLOADING]
Tired of the same old 'ticker-tape' message applets which are threating to take over the Java-tized pages of the world? Here's a nifty way of getting you message across... COMIC STRIP BUBBLES.
Explanation of the HTML parameters:
The param tags are the lines which customize the applet to your needs. Following is a list of all the parameter options which are currently applicable. Note that the 'name=' of the parameter as typed into the HTML document SHOULD BE CAPITALIZED. Defaults (where described) indicate what appropriate values will be used if not explicitly given in the HTML document.
parameters
- FONTSIZE
- FONTTYPE
- URL
- ACTION#
FONTSIZE is simply that, the point size of the font which is used to write the words in the bubbles. FONTSIZE may not be changed once picked. Default is 14.
FONTTYPE is type of the font which is used to write the words in the bubbles. FONTTYPE may not be changed once picked. Choices include (watch case-sensitivity for values): "TimesRoman", "Courier", and more that I have not played with yet... experiment. Default is "Courier".
URL is a destination link which is activated when the applet is clicked upon. The URL value should not contain the http:// part of the web address. The default URL is this explanation page.
The ACTION# parameters start getting a little tricky. Each such parameter should be the string 'ACTION' immediately appended with a number. The first ACTION must be 0; that is, ACTION0. The next should be ACTION1, and so on. Do not skip an ACTION number. If there is a break in the sequence the applet will not jump to the next greatest. The values of the ACTION parameters are composed of arguments separated by '|'. The first argument (which should be capitalized also) relates the type of action the applet is to preform next. The choices for actions are detailed below along with the additional arguments which should accompany them. Remember that the first argument should be CAPITALIZED, but the additional ones should not be.
- BACKGROUND|pathname.to.gif : This action sets up a background image over which the text bubbles will be laid. The path name should be relative to the directory in which the HTML document resides. Reusing this parameter later will cause the new background to overwrite the previous one.
- BUBBLE#|type|direction|x|y|sentence : The BUBBLE type is appended with a number (0-5) which tells the applet that a sentence should be placed within a bubble to appear as comic-strip talk. The 'type' is either 'speech', 'thought', or 'narrative', depending on the type of display desired. speech forms a standard bubble with a pointed 'tail', thought bubbles has a trail of small circular bubble preceding it, and narrative bubble appear in one of the window's corners (dependent on the direction -- see next).
The 'direction' should either be 'ne', 'se', 'sw', or 'nw'. This value indicates which direction the bubble will appear to be relative to the speaker's mouth (i.e.: the 'tail' on the bubble should point towards the speakers mouth). 'x' and 'y' refer to the pixel position of the origin of the bubble (where the tail starts). 0,0 is the upper left cornet of the applet. You may not have more than 6 bubbles displayed at one time.
Finally... the sentence which is to appear in the bubble must be written. Generally you are allowed to just type in the sentence as you want it. However, you must explicitly break to a new line with the '/' character. Also, you may italicize, boldface, or underline a word by immediately preceding it with either {i}, {b}, or {u} respectively. Such mark-up tags only affect the next single word. The applet will automatically size the speech bubble according to the length of the lines, and the lines will have centered justification (except 'narrative bubbles' which justify the text left).
- CLEAR|BUBBLE#|... : This argument erases all bubbles specified in later arguments. For example, CLEAR|BUBBLE2|BUBBLE1|BUBBLE4 would remove pre-established bubbles numbered 1,2 and 4 from the display. Once a bubble is cleared, it may be redefined with later ACTIONS using the standard BUBBLE# argument.
- WAIT|# : This argument causes the applet to pause for a number of milliseconds equal to the additional argument passed. After pausing, the applet will continue to the next ACTION#.
- LOOPBACKTO|# : This argument will cause the applet to loop back to an ACTION number as defined by the second argument. After jumping back, it will continue from that point onward (eventually hitting the loop again). Thus, to repeat the whole comic sequence use LOOPBACKTO|0. Note that you should be careful about looping back because, for example, if you jump back to ACTION4, the applet will not re-enact ACTIONS 0-3... You may have to CLEAR extra bubbles or do other things to keep the display looking pleasant.
Check back periodically for later editions of this applet.
-- Comments and suggestions are welcome: harshec@cdware.eng.sun.com, address Eric Harshbarger
[CAFÉ]-[CREATORS]-[APPLETS]-[FAQ]-[RESOURCES]-[RULES]-[DOWNLOADING]
The Comix2 applet may be used freely by anyone. Neither Sun Microsystems, Inc. nor Eric C. Harshbarger is responsible for any problems resulting from the malfunction or misuse of this applet.
© Copyright 1996, Sun Microsystems, Inc.